package org.dreamfly.core.remote;

import org.dreamfly.core.remote.register.ServiceRegisterSupport;

import java.util.Properties;

/**
 * Created by IntelliJ IDEA.
 * User: Gin
 * Date: 2010-11-27
 * Time: 2:42:38
 * To change this template use File | Settings | File Templates.
 */
public class RuntimeServiceRegister extends ServiceRegisterSupport {

    /**
     * 根据给定的一系列属性注册服务。
     *
     * @param serviceClass
     * @param serviceId
     * @param serviceType
     * @param serviceUrl
     * @param props
     * @return
     */
    public boolean registService(Class serviceClass,String serviceId,String serviceType,String serviceUrl, Properties props){
        ServiceModel serviceModel = new ServiceModel();
        serviceModel.setProps(props);
        serviceModel.setServiceClass(serviceClass);
        serviceModel.setServiceId(serviceId);
        serviceModel.setServiceType(serviceType);
        serviceModel.setServiceUrl(serviceUrl);

        return registService(serviceModel);
    }


}